<?php
class ymdianControl extends skymvc{
	public $ymdianid;
	public function __construct(){
		parent::__construct();		 
	}
	
	public function onInit(){
		$ymdian=M("login")->getymdianAdmin();
	}
	
	public function onDefault(){
		 $data=M("ymdian")->selectRow(array("where"=>"id=".SHOPID)); 
		 
		$this->smarty->assign(array(
			"data"=>$data,			 			 
		));
		$this->smarty->display("ymdian/add.html");
	}
	
	public function onSave(){
			$data=M("ymdian")->postData();
			unset($data['sc_id']);
			M("ymdian")->update($data,"id=".SHOPID)	;	
			$this->goall("保存成功");
	}
	
}
?>